<include file="public:header" />
<div class="toptip">
    <h2>提示：</h2>
    <p>
发送邮件请确认您的邮件配置正确，具体请在 “系统 > 邮件设置”中设置。<br />
</p>
</div>
<div class="seltpye_x">
    <div class="left">筛选类型</div>    
    <div class="right">
    <a href="{:P(array('m_type'=>0))}" <if condition='$Think.get.m_type eq "" || $Think.get.m_type eq 0'>class="select"</if>>不限</a>
    <a href="{:P(array('m_type'=>1))}" <if condition='$Think.get.m_type eq 1'>class="select"</if>>等待发送</a>
    <a href="{:P(array('m_type'=>2))}" <if condition='$Think.get.m_type eq 2'>class="select"</if>>发送成功</a>
    <a href="{:P(array('m_type'=>3))}" <if condition='$Think.get.m_type eq 3'>class="select"</if>>发送失败</a>
    <div class="clear"></div>
    </div>
    <div class="clear"></div>
</div>
   <form id="form1" name="form1" method="post" action="{:U('del')}">
    <table width="100%" border="0" cellpadding="0" cellspacing="0"  id="list" class="link_lan">
    <tr>
      <td  width="120" class="admin_list_tit admin_list_first">
     <label id="chkAll"><input type="checkbox" name="" title="全选/反选" id="chk"/>类型</label>    </td>
      <td class="admin_list_tit" width="13%">收件地址</td>
      <td  class="admin_list_tit">邮件主题</td>
      <td  class="admin_list_tit">邮件内容</td>
      <td width="110"  align="center"  class="admin_list_tit">添加时间</td>   
      <td width="110"  align="center"  class="admin_list_tit">发送时间</td>
      <td width="10%" align="center"  class="admin_list_tit">操作</td>
    </tr>
    <volist name="list" id="vo">
     <tr>
      <td   class="admin_list admin_list_first">
     <input type="checkbox" name="id[]"  value="{$vo.m_id}"/>
     <if condition="$vo['m_type'] eq 1"><span style="color:#FF6600">等待发送</span></if>
     <if condition="$vo['m_type'] eq 2"><span style="color:#009900">发送成功</span></if>
     <if condition="$vo['m_type'] eq 3"><span style="color:#666666">发送失败</span></if>
      </td>
      <td class="admin_list">{$vo.m_mail}</td>
      <td class="admin_list vtip" title="{$vo['m_subject']|nl2br}" >{$vo['m_subject_']}</td>
      <td class="admin_list vtip" title="{$vo['m_body']|nl2br}" >{$vo['m_body_']}</td>
      <td align="center"  class="admin_list">{:admin_date($vo['m_addtime'])}</td>     
      <td align="center"  class="admin_list">
      <if condition="$vo['m_sendtime'] eq 0">
        ----
       <else />
       {:admin_date($vo['m_sendtime'])}
      </if>
      </td>
      <td align="center"  class="admin_list">
      <a href="{:U('mailqueue_edit',array('m_id'=>$vo['m_id']))}">修改</a>
    </td>
    </tr>
    </volist>
  </table>
    <if condition="!$list">
    <div class="admin_list_no_info">没有任何信息！</div>
    </if>
    <span id="OpDel">
    </span>
    <span id="OpSend">
    </span>
  </form>   
   <table width="100%" border="0" cellspacing="10"  class="admin_list_btm">
    <tr>
      <td>
      <input type="button" name="Submit22" value="发送" class="admin_submit" id="ButSend"/>
       <input type="button" name="Submit22" value="添加任务" class="admin_submit"    onclick="window.location='{:U('mailqueue_add')}'"/>
       <input type="button" name="Submit22" value="批量添加" class="admin_submit"    onclick="window.location='{:U('mailqueue_batchadd')}'"/>
        <input type="button" name="ButDel" id="ButDel" value="删除" class="admin_submit" />
      </td>
      <td width="305">
        <form id="formseh" name="formseh" method="get" action="?">  
            <div class="seh">
                <div class="keybox"><input name="key" type="text"   value="{$Think.get.key}" /></div>
                <div class="selbox">
                    <input name="key_type_cn"  id="key_type_cn" type="text" value="{$Think.get.key_type_cn|default="邮件主题"}" readonly="true"/>
                        <div>
                                <input name="key_type" id="key_type" type="hidden" value="{$Think.get.key_type|default="1"}" />
                                                <div id="sehmenu" class="seh_menu">
                                                        <ul>
                                                        <li id="1" title="邮件主题">邮件主题</li>
                                                        <li id="2" title="收件地址">收件地址</li>
                                                        </ul>
                                                </div>
                        </div>              
                </div>
                <div class="sbtbox">
                <input type="submit" name="" class="sbt" id="sbt" value="搜索"/>
                </div>
                <div class="clear"></div>
          </div>
          </form>
      </td>
     </tr>
  </table>
<div class="qspage">{$page}</div>
<div style="display:none" id="SendDiv">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="6">
 <tr>
      <td  width="100"  align="right">发送选择：</td>
      <td>
      
      <label><input name="sendtype" type="radio" value="1" checked="checked"  />      
       已选项目
       </label>
       &nbsp;
       &nbsp;
       <label><input name="sendtype" type="radio" value="2"  />      
       所有等待发送的
       </label>
       &nbsp;
       &nbsp;
       <label><input name="sendtype" type="radio" value="3"   />      
       所有发送失败的
       </label>
                      
        </td>
    </tr>
    <tr>
      <td align="right">发送间隔时间：</td>
      <td>
      <input name="intervaltime" type="text" class="input_text_150"  value="3" maxlength="3" /> 
      秒
      </td>
    </tr>
    <tr>
      <td align="right">最大发送数量：</td>
      <td>
      <input name="sendmax" type="text" class="input_text_150"  value="500" maxlength="3" /> 
      
      0为不限制  
      </td>
    </tr>
     <tr>
      <td align="right">发送失败时：</td>
      <td>
                      <label><input type="radio" name="senderr" value="1"  checked="checked" />
                       跳过继续</label>
                       <label><input type="radio" name="senderr" value="2"  />
                       停止发送</label>
                       </td>
    </tr>
    <tr>
      <td height="70">&nbsp;</td>
      <td>
      <input type="button" name="submitdel"  value="确定" class="admin_submit submitsend"/>
 </td>
    </tr>
  </table>
</div>
<div style="display:none" id="DelDiv">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="6">
 <tr>
      <td  width="30">&nbsp;</td>
      <td>
                      <label><input name="deltype" type="radio" value="1" checked="checked"  />
                      已选项目</label></td>
    </tr>
    <tr>
      <td >&nbsp;</td>
      <td>
                      <label><input type="radio" name="deltype" value="2"  />
                       所有等待发送项目</label></td>
    </tr>
     <tr>
      <td >&nbsp;</td>
      <td>
                      <label><input type="radio" name="deltype" value="3"  />
                       所有发送成功项目</label></td>
    </tr>
    <tr>
      <td >&nbsp;</td>
      <td>
                      <label><input type="radio" name="deltype" value="4"  />
                       所有发布失败项目</label></td>
    </tr>
    
    <tr>
      <td  >&nbsp;</td>
      <td>
                      <label><input type="radio" name="deltype" value="5"  />
                       清空所有列队</label></td>
    </tr>
    <tr>
      <td height="70">&nbsp;</td>
      <td>
      <input type="submit" name="submitdel"  value="确定" class="admin_submit submitdel"/>
 </td>
    </tr>
  </table>
</div>    
</div>
<include file="public:footer" />
<script type="text/javascript">
$(document).ready(function()
{
    showmenu("#key_type_cn","#sehmenu","#key_type");
    $("#ButSend").QSdialog({
    DialogAddObj:"#OpSend",
    DialogTitle:"请选择",
    DialogContent:"#SendDiv",
    DialogContentType:"id",
    DialogWidth:500 
    });
    $("#ButDel").QSdialog({
    DialogAddObj:"#OpDel",
    DialogTitle:"您要删除哪些信息?",
    DialogContent:"#DelDiv",
    DialogContentType:"id",
    DialogWidth:300 
    });
    //发送
    $(".submitsend").live('click',function(){
            $("form[name=form1]").attr("action","{:U('totalsend')}");
            $("form[name=form1]").submit()
    });
});
</script>
</body>
</html>